function [aspectrum,wts] = audspec_MVDR(pspectrum, sr, nfilts, minfreq, maxfreq, sumpower, bwidth)

if nargin < 2;  sr = 16000;                          end
if nargin < 3;  nfilts = 24; end
if nargin < 4;  minfreq = 0;    end
if nargin < 5;  maxfreq = sr/2; end
if nargin < 6;  sumpower = 1;   end
if nargin < 7;  bwidth = 1.0;   end

[nfreqs,nframes] = size(pspectrum);

nfft = (nfreqs-1)*2;

  wts = fft2melmx_MVDR(nfft, sr, nfilts, bwidth, minfreq, maxfreq);

wts = wts(:, 1:nfreqs);

% Integrate FFT bins into Mel bins, in abs or abs^2 domains:
if (sumpower)
  aspectrum = wts * pspectrum;
else
  aspectrum = (wts * sqrt(pspectrum)).^2;
end

